package cn.xbtop.service.impl;

import cn.xbtop.domain.UserAddress;
import cn.xbtop.service.UserService;

import java.util.Arrays;
import java.util.List;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/5/19 22:04
 */
public class SubUserServiceImpl implements UserService {
    private UserService userService;

    public SubUserServiceImpl(UserService userService) {
        this.userService = userService;
    }

    @Override
    public List<UserAddress> queryAllAddress(String userId) {
        try {
            return userService.queryAllAddress(userId);
        } catch (Exception e) {
            return Arrays.asList(new UserAddress(1, "本地存根", "aaaaa"));
        }
    }
}
